Skip to content

Conversation

@devnatan
Copy link
Owner

@devnatan devnatan commented Dec 20, 2025

Fixes cases when Docker returns null for a nullable API field but in Docker Kotlin field declaration it is defined as non-null (we expect a default value).

Example:

@SerialName("Cmd") public val command: List<String> = emptyList(),

Stack-trace:

kotlinx.serialization.json.internal.JsonDecodingException:
Unexpected JSON token at offset 5874: Expected start of the array '[', but had 'n' instead at path: $.Config.Cmd

@devnatan devnatan self-assigned this Dec 20, 2025
@devnatan devnatan changed the title Do not require explicit nulls in json deserialization Handle explicit nulls for field with default value in json deserialization Dec 20, 2025
@devnatan devnatan merged commit 789fb85 into main Dec 20, 2025
1 of 2 checks passed
@devnatan devnatan deleted the fix/null-cmd-containerconfig branch December 20, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants